﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AddIn.EA.Framework.Common;

namespace AddIn.EA.Framework
{
    /// <summary>
    /// Class that represent a list of scenarios. Composite the Method class.
    /// </summary>
    public class ScenarioList : BaseList<Scenario>
    {
        #region Constructors
        /// <summary>
        /// Get an instance of scenarios list.
        /// </summary>
        /// <param name="reference">The reference of EA Object Model parameter collection.</param>
        /// <param name="parent">The parent element.</param>
        public ScenarioList(EA_Application.Collection reference, IElement parent)
            : base(reference, parent) { }
        #endregion
    }

    /// <summary>
    /// Class that represent a condition.
    /// </summary>
    public class Scenario : BaseElement<EA_Application.Scenario>
    {
        #region Constructors
        /// <summary>
        /// Get an instance of scenario.
        /// </summary>
        /// <param name="reference">The reference of EA Object Model parameter.</param>
        /// <param name="parent">The parent element.</param>
        public Scenario(EA_Application.Scenario reference, IElement parent)
            : base(reference, parent) { }
        #endregion

        #region Properties

        #region BaseElement Members
        /// <summary>
        /// The scenario id.
        /// </summary>
        public override int ID
        {
            get { return 0; }
        }
        /// <summary>
        /// The scenario name.
        /// </summary>
        public override string Name
        {
            get
            {
                return this.Reference.Name;
            }
            set
            {
                this.Reference.Name = value;
            }
        }
        #endregion

        /// <summary>
        /// Notes for scenario.
        /// </summary>
        public string Notes
        {
            get { return this.Reference.Notes; }
            set { this.Reference.Notes = value; }
        }

        /// <summary>
        /// The scenario guid.
        /// </summary>
        public string ScenarioGUID
        {
            get { return this.Reference.ScenarioGUID; }
            set { this.Reference.ScenarioGUID = value; }
        }

        /// <summary>
        /// The scenario weight.
        /// </summary>
        public int Weight
        {
            get { return this.Reference.Weight; }
            set { this.Reference.Weight = value; }
        }

        /// <summary>
        /// The scenario xml content.
        /// </summary>
        public string XMLContent
        {
            get { return this.Reference.XMLContent; }
            set { this.Reference.XMLContent = value; }
        }

        /// <summary>
        /// The condition type.
        /// </summary>
        public string Type
        {
            get { return this.Reference.Type; }
            set { this.Reference.Type = value; }
        }
        #endregion
    }
}
